﻿
macro(CreateGuideEntity APPLICATION_NAME)
    set(TARGET_NAME ${APPLICATION_NAME})

    if(NOT EXISTS "{CMAKE_CURRENT_SOURCE_DIR}/entity.h")
        configure_file(${GUIDE_ENTITY_H_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/entity.h)
    endif()

    if(NOT EXISTS "{CMAKE_CURRENT_SOURCE_DIR}/entity.cpp")
        configure_file(${GUIDE_ENTITY_CPP_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/entity.cpp)
    endif()

    if(NOT EXISTS "{CMAKE_CURRENT_SOURCE_DIR}/main.cpp")
        configure_file(${GUIDE_MAIN_CPP_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
    endif()



    list(APPEND TARGET_SRC 
        ${CMAKE_CURRENT_SOURCE_DIR}/entity.h
        ${CMAKE_CURRENT_SOURCE_DIR}/entity.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
        )



    add_executable(${TARGET_NAME} ${TARGET_SRC})

endmacro(CreateGuideEntity)
